package com.wxj.bank.module.enums;

public enum UserVip {

    BASIC(0,"basic"),
    SECOND(1,"always"),
    THIRD(2,"very good")
    ;
    private int vip;
    private final String comment;

    UserVip(int vip,String comment){
        this.vip = vip;
        this.comment = comment;
    }

    public static UserVip userVip(int vip){
        for(UserVip vip1:values()){
            if(vip1.getVip() == vip){
                return vip1;
            }
        }
        return null;
    }

    public int getVip() {
        return vip;
    }

    public String getComment() {
        return comment;
    }
}
